home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5907 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help C++ 3.0 Menu
  5. Date: 7 Feb 1996 12:22:48 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4fa5io$puh@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe10.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 06, 1996 22:32:06 in article <Help C++ 3.0 Menu>,
  15. 'dlanctot@blvl.igs.net (Daniel Lanctot)' wrote: 
  16.  
  17.  
  18. >I have created a menu system for school and it works great until somebody 
  19.  
  20. >types a char.I used a do while loop and case: statement. How would I be
  21. able  
  22. >too use the up and down arrows also if any body has an idea Please reply  
  23. The answer depends on your platform and compiler system.  I'm 
  24. guessing DOS and Borland/Turbo. 
  25.  
  26. Use <conio.h> and get your input with getch().  If the value returned 
  27. is 0, the next call to getch() returns the code for the extended key 
  28. pressed.  To find out the values for extended keys (and to get a  
  29. little extra programming practice) write a program that inputs via  
  30. getch() and prints out the decimal value of the key pressed.  The  
  31. arrow keys are somewhere in the vicinity of 75. 
  32. -- 
  33. Pete Grant 
  34. Kalevi, Inc. 
  35. Object Oriented Software Development
  36.